//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.kc.gb.device.common.utils;

import com.google.common.base.CaseFormat;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;

public class StringUtil extends StringUtils {
    public StringUtil() {
    }

    public static String covertCamelCaseToSnake(String camel) {
        return CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, camel);
    }

    public static Map<String, Object> covertCamelCaseToSnakeOverMapKeys(Map<String, Object> map) {
        return (Map)map.entrySet().stream().collect(Collectors.toMap((x) -> {
            return covertCamelCaseToSnake((String)x.getKey());
        }, (x) -> {
            return x.getValue();
        }));
    }
}
